package com.usian.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.usian.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {

    @Select("select e.* from t_role e,t_user_role r where e.id=r.role_id and r.user_id =#{userId}")
    public List<Role> findByUserId(@Param("userId") Integer userId);
}
